<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="include::head"></head>
<body>
<div class="layui-fluid">
    <!--form表单-->
    <form class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">敏感词</label>
            <div class="layui-input-block">
                <input type="text" th:value="${sensitive.badword}" name="badword" autocomplete="off" class="layui-input" lay-verify="required">
            </div>
        </div>
        <input type="hidden" th:value="${sensitive.id}"  name="id">
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="edit">立即提交</button>
            </div>
        </div>
    </form>
</div>
<div th:include="include::onload"></div>

    <script  th:inline="javascript">
    layui.config({
        base: '/js/layer/module/'//模块存放的目录
    }).use(['form'], function(){
        var form = layui.form;
        // 监听提交
        form.on('submit(edit)', function(data) {
            $.achieve.post("/admin/basics/sensitive/update",data.field,"",true);
            return false;
        });

    });
</script>

</body>
</html>